<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登陆页面</title>
    <link rel="stylesheet" href="./style.css">
</head>

<body>
    <div class="container">
        <h2>登录</h2>
        <form action="">
            <div class="fr">
                <input type="text" required>
                <label>Email</label>
                <!-- <label>
                    <span style="transition-delay: 0ms">E</span>
                    <span style="transition-delay: 50ms">m</span>
                    <span style="transition-delay: 100ms">a</span>
                    <span style="transition-delay: 150ms">i</span>
                    <span style="transition-delay: 200ms">l</span>
                </label> -->
            </div>
            <div class="fr">
                <input type="password" required>
                <label>Password</label>
                <!-- <label>
                    <span style="transition-delay: 0ms">P</span>
                    <span style="transition-delay: 50ms">a</span>
                    <span style="transition-delay: 100ms">s</span>
                    <span style="transition-delay: 150ms">s</span>
                    <span style="transition-delay: 200ms">w</span>
                    <span style="transition-delay: 250ms">o</span>
                    <span style="transition-delay: 300ms">r</span>
                    <span style="transition-delay: 350ms">d</span>
                </label> -->
            </div>
            <button class="btn">登录</button>
            <p class="text">没有账号？
                <a href="#">注册</a>
            </p>
        </form>
    </div>
</body>
<script>
    const labels = document.querySelectorAll('.fr label')
    labels.forEach(label => {
        label.innerHTML = label.innerText
            .split('')
            .map((letter, idx) => `<span style="transition-delay:${idx * 50}ms">${letter}</span>`)
            .join('')
    })
</script>

</html>